/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package frmsystem;

import java.util.Date;

/**
 *
 * @author Group 7
 */
public class Entry implements IEntry {

    protected double amount;
    protected Date date;
    protected IAccount account;
    protected int type;
    protected ITransactionEvent event;
    
    public IAccount getAccount(){
    	return account;
    }
    
    public Entry(IAccount account){
    	this.account = account;
    }
    
    public void execute() {  
    	account.setBalance(account.getBalance() + amount);
    }

	public double getAmount() {
		return amount;
	}

	public Date getDate() {
		return date;
	}
	
	public String toString(){
		return "Deposit : $ " + String.valueOf(amount) + " , " + date.toString();
		
	}

	public void setAmount(double amount) {
		this.amount = amount;
		
	}

	public void setDate(Date date) {
		this.date = date;		
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public ITransactionEvent getEvent() {
		return event;
	}

	public void setEvent(ITransactionEvent event) {
		this.event = event;
	}



}
